-- =============================================
-- Author:		Matias Iacono
-- Create date: 21/09/2008
-- Description:	
-- =============================================
CREATE PROCEDURE InsertNewArticle 
	@Publisher_ID int, 
	@Path varchar(255),
	@Title varchar(200),
	@Short_Description varchar(max),
	@Publish_Date smalldatetime,
	@AllowedToPublish bit	
AS
BEGIN
	SET NOCOUNT ON;

	INSERT INTO tblArticles(Publisher_ID, [Path], Title,
		Short_Description, Publish_Date, AllowedToPublish, TotalVisits,
		TotalPoints, TotalVotes)
		VALUES (@Publisher_ID, @Path, @Title, @Short_Description, @Publish_Date,
			@AllowedToPublish, 1, 3, 1);

	SELECT @@IDENTITY AS ArticleID;
END
GO
